//
//  TagPageCell.m
//  PetTown
//
//  Created by lanou3g on 15/5/30.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "TagPageCell.h"
#define LHeight self.contentView.frame.size.height
#define LWidth  self.contentView.frame.size.width
@implementation TagPageCell
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUpSubViews];
    }
    return self;
}

//创建cell上显示的控件
- (void)setUpSubViews{
    self.imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, LWidth, LHeight - 30)];
    self.imgView.contentMode = UIViewContentModeScaleAspectFit;
    self.imgView.backgroundColor = [UIColor grayColor];
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, LHeight - 30, LWidth, 30)];
    self.nameLabel.textColor = [UIColor blackColor];
    self.nameLabel.backgroundColor = [UIColor whiteColor];
    self.nameLabel.alpha = 0.5;
    self.nameLabel.textAlignment = NSTextAlignmentCenter;
    self.nameLabel.font = [UIFont systemFontOfSize:16.0];
    [self.contentView addSubview:self.imgView];
    [self.contentView addSubview:self.nameLabel];
}

- (void)setTagPage:(TagPage *)tagPage{
    self.nameLabel.text = tagPage.tag_name;

}
@end
